/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Test;

import com.bionic.CES.DAO.IUserDAO;
import com.bionic.CES.beans.User;
import com.bionic.CES.businessLogic.UserService;
import com.bionic.CES.connections.DAOFactory;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;

/**
 *
 * @author Jarik
 */
public class Test {

    public static void main(String[] args) {
//
//        DAOFactory factory = DAOFactory.getDAOFactory(DAOFactory.MYSQL);
//        IUserDAO userDAO = factory.getUserDAO();
//
//        User user = new User();
//   user.setName("Iaroslav");
//   user.setSurName("Kovalenko");
//    user.setEmail("xXx@ukr.net");
        //   user.setPassword("root");
//        user.setAdress("Kiev");
//    user.setTelephone("063");
//    user.setStatus("ADMIN");
//        //   user.setUserid(id);
//        List<User> result = new ArrayList();
//        try {
//            //userDAO.add(user);
//            //System.out.println (userDAO.findByDynamicSelect(user));
//            System.out.println (user);
//            result = userDAO.findByDynamicSelect(user);
//            System.out.println ("User found succesfully "+result);
//        } catch (SQLException ex) {
//            System.out.println("Exception occured during adding new user ");
//            ex.printStackTrace();
//        }
//    }
        System.out.println("UserId="+UserService.checkUserLoginAndPassword("root", "root"));
    }
}
